/**
 * @(#)Sesionable.java Jul 3, 2008
 *
 * Copyright (c) 2005-2010 Psiqueware S.A. de C.V. All Rights Reserved.
 * This software is the proprietary information Psiqueware S.A. de C.V.
 * Use is subject to license terms.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 *
 * <br/>Usuario : AngelElectrico
 * <br/>Creaci&oacute;n: Jul 3, 2008 - 9:13:24 PM
 * <br/>
 * <br/>
 * <br/><t5>Cambios :</t5>
 * <br/><b>Fecha | Autor  |  Cambios</b>
 * <ul>
 * <li>Jul 3, 2008 | <a href = "mailto:AngelElectrico@PsiqueWare.com">Angel El&eacute;ctrico</a> | Creaci&oacute;n del Objeto.</li>
 *
 * </ul>
 */

package com.psiqueware.alheli.id;

import com.psiqueware.alheli.manager.ManagerException;

/**
 * Interfase para un objeto que acepta informacion de identificaci&oacute;n y autentificaci&oacute;n
 * a fin de generar una bandera de ingreso e iniciar una sesi&oacute;n.
 * <br/>Paquete Original: com.psiqueware.basico.id
 * <br/>Nombre  Original: Sesionable
 * <br/>Oprima para ver : <a href="Sesionable.java.html"><i>C&oacute;digo Fuente</i> </a>
 *
 * @author <a href="mailto:AngelElectrico@PsiqueWare.com">Angel El&eacute;ctrico</a>
 * @version Revision: 1.1 Jul 3, 2008 9:13:24 PM
 */
public interface Sesionable
{

    /**
     * Determina si un Usuario puede entrar al sistema o no.
     *
     * @param identificacion del {@link Identificacion} que se busca
     * @param autenticacion  del {@link Identificacion} que se busca
     *
     * @return <code>true</code> si se pudo realizar el logeo; <code>false</code> en caso contrario.
     *
     * @throws IdException si se presenta alg&uacute;n problema.
     */
    boolean iniciarSession(String identificacion, char[] autenticacion) throws ManagerException;

    /**
     * Utilizado para invocar un cierre de session.
     *
     * @return <code>true</code> si se pudo cerrar la session; <code>false</code> en caso contrario.
     *
     * @throws IdException si se presenta alg&uacute;n problema.
     */
    boolean finalizarSession() throws ManagerException;
}
